package com.zb.vo;

import com.zb.annotation.NumberPattern;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @Author WEN
 * @Date 2023/9/4 0004
 **/
@Data
@ApiModel("编码商品更改对象")
public class CodeGoodsChangeVo {
    @NotNull(message = "编码ID不能为空")
    @ApiModelProperty(value = "编码ID", required = true)
    private Long id;

    @NotNull(message = "表类型不能为空")
    @ApiModelProperty(value = "表类型")
    private Integer tableType;

    @NotNull(message = "商品类型不能为空")
    @NumberPattern(regexp = "^(1|2)$", message = "商品类型参数不合法", required = true)
    @ApiModelProperty(value = "商品类型：1-成品，2-备件")
    private Integer type;

    @NotNull(message = "商品ID不能为空")
    @ApiModelProperty(value = "商品ID")
    private Long goodsId;

    @NotNull(message = "商品规格ID不能为空")
    @ApiModelProperty(value = "商品规格ID")
    private Long goodsSpecId;

    @Length(max = 500, message = "备注限制500个字符以内")
    @ApiModelProperty(value = "备注")
    private String remark;
}
